<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
<script>
    var flag = [{
        value: 100,
        label: '100',
        disabled: true
    }, {
        value: 200,
        label: '200',
        disabled: false
    }, {
        value: 300,
        label: '300',
        disabled: true
    }, {
        value: 400,
        label: '400',
        disabled: true
    }]

    var my = [{
        value: 200,
        name: 'jack'
    }, {
        value: 300,
        name: 'marry'
    }, {
        value: null,
        name: 'marry'
    }]

    var newArr = []
    for (var i = 0; i < flag.length; i++) {
        var count = 0
        var blank = 0
        for (var j = 0; j < my.length; j++) {
            if (my[j].value == null) {
                blank++
                continue
            }
            if (flag[i].value != my[j].value) {
                count++
            }
        }
        if (count == my.length - blank) {
            newArr.push(flag[i])
        }
    }
    console.log(newArr)

    var k = [1, 2, 3, 4, 5]
    console.log(k.splice(1, 3), k)

    var k2 = [1, 2, 3, 4, 5]
    console.log(k2.slice(1, 3), k2)

    function calc(a, b) {
        return a + b
    }

    console.log('计算函数:', calc(2022, 100))
    console.log('数组对象:', k2)
</script>
</body>

</html>
